class Takes(db.Model):
    __tablename__ = "takes"

    takes_id = db.Column(db.Integer, primary_key=True, unique=True)  # Takes表中不能少主键，增删改查需要用

    section_id = db.Column(db.Integer, db.ForeignKey("section.section_id", ondelete='CASCADE'))
    student_id = db.Column(db.Integer, db.ForeignKey("student.student_id", ondelete='CASCADE'))
    course_id = db.Column(db.Integer, db.ForeignKey("course.course_id", ondelete='CASCADE'))
    isPrimary = db.Column(db.Boolean, default=True)
    grade = db.Column(db.String(1))